Use htslib - #5
Merged
Merged
Conversation
…ions that I need to complete.
…. I can run the program and all inputs but --help are parsed correctly.
…xed bug where I don't use the specified data stream to print logger record.
…o correctly extract data.
…ry file I/O as class methods.
…, intermediate update
…to use '\;' and not '\;' as I had been using.
debugging haplotype model equations
…crtiption. Writing binary grm file specification.
…ake of terminating a code block with two back ticks instead of three.
Forgot terminating brace on definition of array.
… grm file specification for clarity of exposition.
Fix grammatical errors in type descriptions, complete the meta data table with all fields (magic, version, date, user, contig, markers, samples), correct offset error, and clarify payload section. https://claude.ai/code/session_0116D5VsHW8prM7LEGxa4TVk
…-Zfza3 Complete .grm file format specification in README.
…pdated to only store upper triangular matrix of GRM
…_ptr to nullptr, fixed. minor bugs in test code and io.h have been resolve.
…rs to idx of the linear array.
…Hdr to call data member default constructors instead of setting to nullptr.
Add 42 unit tests covering Coordinates, Samples, Hdr, Grm struct, MATRIX_IDX_TO_ARRAY macro, and full GRM file I/O. Tests can be built and run standalone via `make test_grm`. TestGrmFile.ReadNullArgs FAILS: grm::read(FileIO*, Hdr*, Grm*) at src/grm.cpp:496 returns ERROR_ON_READ for null pointer arguments, but the corresponding write function returns ERROR_NULLPTR_ARG. Also fixes: add missing `inline` on io::open() in include/io.h to prevent multiple-definition linker errors when included from multiple translation units. https://claude.ai/code/session_01FXkdgU8L4ws7LoCu16wG4s
New tests cover: - Coordinates: single position, null fid, read overwrites existing - Samples: single sample, empty names (ERROR_INVALID_ARG), null fid, read overwrites existing - Hdr: all GrmType enum values round-trip, version field fidelity, null fid - Grm: 1x1 matrix, set via lower/get via upper triangle, 5x5 matrix indexing, move-assign replaces non-empty - GRM file: empty file read, null fid, magic number verification, single-sample round-trip, truncated file, two sequential writes then reads All 66 tests pass. https://claude.ai/code/session_01FXkdgU8L4ws7LoCu16wG4s
…ison of a unit64_t with an int, I've tried to find all cases and fix by static_cast.
…t tests for all expected haplotype counts. The ground truth values are stored in a csv hd_0i.csv where hd represents haplotype dose and i the sample number.
Use htslib
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.